var pdfcrowd = require("pdfcrowd");
var http = require('http');

http.createServer((req,res)=>{
// create the API client instance
var client = new pdfcrowd.HtmlToPdfClient("871702544", "4fbb3b6f4d138f72da14ace1502f38e2");

// run the conversion and write the result to a file
client.convertUrlToFile(
    "http://ip-tax-credit-report.richdatahub.io.s3-website.cn-northwest-1.amazonaws.com.cn",
    "example.pdf",
    function(err, fileName) {
        if (err) return console.error("Pdfcrowd Error: " + err);
        console.log("Success: the file was created " + fileName);
    });
}).listen(8200);
